package org.dreamfly.core.util;

import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Structure;


/**
 * Created by IntelliJ IDEA.
 * User: Gin
 * Date: 2010-10-13
 * Time: 21:04:03
 * To change this template use File | Settings | File Templates.
 */
public interface ContentDll extends Library {
    public static class VideoInfo extends Structure {
       public     String pcContent;//视频内容描述 null
       public     String pcFilmType;//视频类型 input/not null
       public     String pcFileType;//文件类型 input/not null
       public     int iFileID;//  视频ID input/not null
       public     int iFileSize;//文件大小KB output/not null
       public     int iFilmHight;//文件高度 output/not null
       public     int iFilmWidth;//文件宽度 output/not null
       public     int iICard;//关键帧
       public     int iHeadLength;//文件头长度
       public     int iClipStartOffset;//剪辑起始位置
       public     int iClipEndOffset;//剪辑结束位置
       public     String pcSeverName;//文件所在服务器名称 input/not null
       public     String pcFilePath;//文件存储路径 input/notnull
       public     String pcKeyFrameFolder;//关键帧存储路径  input/not null
       public     String pcKeyFrameName;//关键帧文件名
       public static class ByReference extends VideoInfo implements Structure.ByReference {}
       public static class ByValue extends VideoInfo implements Structure.ByValue {}
    }
    ContentDll INSTANCE = (ContentDll) Native.loadLibrary("DatabaseOP",ContentDll.class);
    public void ColseDatabase();
    public int Input_data(VideoInfo.ByReference videoInfo,boolean bIsUTF_8);
    public int Delete_data(String pcFileName,boolean bIsUTF_8);
    public boolean OpenDatabase(String serverName, String databaseName, String username, String password, String tableName);
    public int Search_Film(String pcFilename,boolean bIsUTF_8);
    public int GetResultCount();
    public VideoInfo GetResultAt(int aIndex);
    public void ReleaseResultSet();
}
